<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('我的通知通告')"/>
</head>
<body class="bg-gray-100 min-h-screen">
<!-- 居中容器 -->
<div class="container mx-auto px-4 py-8 max-w-4xl">
    <!-- 内容卡片 -->
    <div class="bg-white rounded-xl shadow-lg p-6 transform transition-all hover:shadow-xl">
        <form class="form-horizontal m" id="form-notice-edit" th:object="${notify}">
            <!-- 标题和类型在同一行 -->
            <div class="form-group row mb-6">
                <div class="col-md-6">
                    <label class="col-sm-4 control-label">公告标题：</label>
                    <div class="col-sm-4">
                        <input id="notifyTitle" name="notifyTitle" th:field="*{notifyTitle}" class="form-control" type="text" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <label class="col-sm-4 control-label">公告类型：</label>
                    <div class="col-sm-4">
                        <select name="notifyType" class="form-control" th:with="type=${@dict.getType('oa_notify_type')}" disabled>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{notifyType}"></option>
                        </select>
                    </div>
                </div>
            </div>
            
            <div class="form-group">
                <label class="col-sm-2 control-label">公告内容：</label>
                <div class="col-sm-10">
                    <input id="notifyContent" name="notifyContent" th:field="*{notifyContent}" type="hidden">
                    <!-- 只读内容展示区域 -->
                    <div id="content-view" class="border p-5 bg-gray-50 rounded-lg min-h-[200px]">
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<th:block th:include="include :: footer"/>
<script type="text/javascript" th:inline="javascript">
    $(document).ready(function() {
        // 获取内容并设置到视图中
        var content = $("#notifyContent").val();
        $('#content-view').html(content);
    });
</script>
</body>
</html>